/**
 * Created by Zzhk on 2017/6/30.
 */
$(function(){
    var fn = ABUS.Fn;

    $(".header .rightBtn").on("touchend",function () {

        fn.confirm({
            onSubmit: function () {
                fn.get({
                    url:"/common/order/setProblemOrder",
                    data:{
                        orderId:__param__.orderId,
                        childOrderId:__param__.id,
                        problemRemark:$("textarea").val()
                    },
                    success:function (data) {
                        if(data.result == 1){
                            fn.page_goto({
                                url : "./yewuyuan_banli_shouye.html"
                            })
                        }else{
                            alert(data.message)
                        }
                    }
                })
                fn.closeModal();
            },
            onCancel: function () {
                fn.closeModal();
            }
        })

    });
    $(document.body).on("input","textarea",function () {
        var len =$(this).val().length;
        if(len > 200){
            return false;
        }
        $(".font_length").text(len + "/200");
    })
});